The present invention relates generally to a resource sharing method applicable to a cloud computing environment, and more particularly, but not by way of limitation, to a system, method, and computer program product for optimizing access to synchronization objects, also known as locks, by placing them at the nodes that need them the most, prospectively moving them from node to node as the access pattern changes at runtime.
A common difficulty for cloud computing environments and other distributed systems is that of arranging safe access to resources shared by multiple nodes. Strategies used for synchronized resource sharing in these systems include avoidance, synchronized clocks, election of a coordinator component or node to manage resources, a token ring strategy (e.g., round-robin, etc.) where one node at a time may acquire a lock, etc.
However, none of these strategies allows a worker node to ordinarily attempt to acquire a lock immediately on demand. If a lock will be acquired at all, there is nearly always a delay, either for a timestamp check that must coordinate access, or for a resource manager that must intervene, or for a token that goes around and must come around. For that reason, resource sharing is, at best, quite a bottleneck. At worst, it is arguably the biggest design constraint in modern computing.